<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>前端中使用art-template模板</title>
</head>
<body>
<script type="text/template" id="tpl">
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>前端中使用art-template模板</title>
    </head>
    <body>
        <p>大家好，我叫：{{ name }}</p>
        <p>我今年{{ age }}</p>
        <p>我来自{{ province }}</p>
        <p>我喜欢：{{ each hobbies }} {{ $value }} {{/each}}</p>
    </body>
    </html>
</script>
<script type="text/javascript" src="./node_modules/art-template/lib/template-web.js"></script>
<script>
    var ret = template('tpl', {
        name:'a-ke',
        province:'福州',
        age:20,
        hobbies:['听歌', '看电影', '打台球']
    });
    console.log(ret)
</script>
</body>
</html>